package com.gome.rb.entity;

import java.io.Serializable;
import java.util.Date;

public class RefundBankBean implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static final String TASKSTATE_UNHANDLE = "1";
	public static final String TASKSTATE_SENDING = "2";
	public static final String TASKSTATE_SENDFINISH = "3";
	public static final String TASKSTATE_SENDFAILURE = "4";
	public static final String TASKSTATE_EXCEPTION = "5";
	//原路退款单 退款状态如果是A的话推送ATG
	public static final String REFUNDTATE_UNHANDLE ="N";
	//原路退款单 退款状态如果是A的话推送ATG
	public static final String REFUNDTATE_SENDFINISH ="A";
	//提现单 退款状态如果是B的话推送ATG
	public static final String REFUNDTATE_SENDTOATG ="B";

	private String orderNo; // 订单编号
	private String payOrderNo; // 支付订单编号
	private String accountName;// 账号名
	private String accountNo;// 账号
	private String refundTradeNo;//退款流水号
	private String refundNo; // 退款编号ID
	private Double refundAmount; // 退款金额
	private Integer sendCount; // 发送次数
	private String taskState = "1"; // 任务状态：1=未执行，2=执行中，3=完成，4=失败，5异常
	private String bankType; // 原路返回平台类型
	private Integer buid; // 销售渠道代码
	private String refundState;

	private Date createTime = new Date(); // 任务创建时间
	private Date startTime; // 任务开始执行时间
	private Date finishTime; // 任务执行结束时间
	private Date payTime; // 订单支付时间
	private String userName; //会员账号
	private String payTradeNo; //支付交易流水号
	private String logContent;
	private Double payAmt;		//支付金额    单位：元
	private String cardNumber; //卡号
	private String orgSysno;	//原系统参考号
	private String refundDetailsId;//退款交易明细ID
	
	
	public String getRefundDetailsId() {
		return refundDetailsId;
	}

	public void setRefundDetailsId(String refundDetailsId) {
		this.refundDetailsId = refundDetailsId;
	}

	public String getOrgSysno() {
		return orgSysno;
	}

	public void setOrgSysno(String orgSysno) {
		this.orgSysno = orgSysno;
	}
	public Double getPayAmt() {
		return payAmt;
	}

	public void setPayAmt(Double payAmt) {
		this.payAmt = payAmt;
	}

	public String getCardNumber() {
		return cardNumber;
	}

	public void setCardNumber(String cardNumber) {
		this.cardNumber = cardNumber;
	}
	
	public String getLogContent() {
		return logContent;
	}

	public void setLogContent(String logContent) {
		this.logContent = logContent;
	}

	public String getPayTradeNo() {
		return payTradeNo;
	}

	public void setPayTradeNo(String payTradeNo) {
		this.payTradeNo = payTradeNo;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getRefundTradeNo() {
		return refundTradeNo;
	}

	public void setRefundTradeNo(String refundTradeNo) {
		this.refundTradeNo = refundTradeNo;
	}
	public Date getPayTime() {
		return payTime;
	}

	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}

	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	public String getPayOrderNo() {
		return payOrderNo;
	}

	public void setPayOrderNo(String payOrderNo) {
		this.payOrderNo = payOrderNo;
	}

	public String getRefundNo() {
		return refundNo;
	}

	public void setRefundNo(String refundNo) {
		this.refundNo = refundNo;
	}

	public Double getRefundAmount() {
		return refundAmount;
	}

	public void setRefundAmount(Double refundAmount) {
		this.refundAmount = refundAmount;
	}

	public Integer getSendCount() {
		return sendCount;
	}

	public void setSendCount(Integer sendCount) {
		this.sendCount = sendCount;
	}

	public String getTaskState() {
		return taskState;
	}

	public void setTaskState(String taskState) {
		this.taskState = taskState;
	}

	public String getBankType() {
		return bankType;
	}

	public void setBankType(String bankType) {
		this.bankType = bankType;
	}

	public Integer getBuid() {
		return buid;
	}

	public void setBuid(Integer buid) {
		this.buid = buid;
	}

	public String getRefundState() {
		return refundState;
	}

	public void setRefundState(String refundState) {
		this.refundState = refundState;
	}

	public String getAccountName() {
		return accountName;
	}

	public void setAccountName(String accountName) {
		this.accountName = accountName;
	}

	public String getAccountNo() {
		return accountNo;
	}

	public void setAccountNo(String accountNo) {
		this.accountNo = accountNo;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getFinishTime() {
		return finishTime;
	}

	public void setFinishTime(Date finishTime) {
		this.finishTime = finishTime;
	}

	public boolean isRefundBalance() {
		if (accountNo == null || accountName == null) {
			return false;
		}
		if (!((payOrderNo == null || payOrderNo.length()==0))) {
			return false;
		}
		return true;
	}

	public boolean isRefundBank() {
		if (payOrderNo == null || payOrderNo.length()==0 ) {
			return false;
		}
		if (!((accountNo == null || accountNo.length() == 0) && (accountName == null || accountName
				.length() == 0))) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "RefundTask [orderNo=" + orderNo + ", payOrderNo=" + payOrderNo
				+ ", accountName=" + accountName + ", accountNo=" + accountNo
				+ ", refundNo=" + refundNo + ", refundAmount=" + refundAmount
				+ ", sendCount=" + sendCount + ", taskState=" + taskState
				+ ", bankType=" + bankType + ", buid=" + buid
				+ ", refundState=" + refundState + ", createTime=" + createTime
				+ ", startTime=" + startTime + ", finishTime=" + finishTime
				+ "]";
	}

}
